package com.markul.android.ui.personal

import android.os.Bundle
import android.os.Handler
import android.view.MotionEvent
import androidx.appcompat.app.AppCompatActivity
import com.markul.android.R
import com.markul.android.ui.UiTool
import kotlinx.android.synthetic.main.activity_share_my_map.*

class ShareMap:AppCompatActivity() {
    val handler= Handler()
    override fun onCreate(savedInstanceState: Bundle?) {
        super.onCreate(savedInstanceState)
        setContentView(R.layout.activity_share_my_map)
        UiTool.hideStatusNavigationBar(this, true)

        backBtn.setOnClickListener{
            finish()
        }
}
    override fun dispatchTouchEvent(ev: MotionEvent): Boolean {
        when (ev.getAction()) {
            MotionEvent.ACTION_UP ->
                //设置延时让画面先加载好
                handler.postDelayed(
                    Runnable {
                        UiTool.hideStatusNavigationBar(this, true)
                    }, 3000
                )
        }
        return super.dispatchTouchEvent(ev)
    }
}